<!DOCTYPE html>
<html lang="en">
  <head>
      <meta charset="UTF-8">
      <title>选择器优先级</title>
    <!--
        行内样式优先级 > id选择器优先级 > class选择器优先级 > 元素选择器优先级
    -->
    <style type="text/css">
      #id01 {
        color: yellow;
      }
      .class01 {
        color: green;
      }
      div {
        color: brown;
      }
    </style>
  </head>

  <body>
    <h1>
      lmy
    </h1>
    <div style="color:red" id="id01" class="class01">
      lmy111
    </div>
  </body>
</html>